Datamatic tools

Datamatic Tools (dm_tools) is a management system for the database shared by CADMATIC applications within one project. It consists of a set of programs and a function library.

  • CADMATIC project administrators use Datamatic programs to create and update the Shared Data Environment (SDE).

  • CADMATIC applications use Datamatic functions to access data in the SDE.

The SDE consists of the following data entities:

  • configuration tables

  • dimension tables

  • corporate part catalog

  • piping specifications

  • instructions to control the generation of documents

  • drawing sheets

  • format control for reports

  • symbol libraries

Any data entities that are not in the list above are application-dependent and not under the control of Datamatic.

Important: Project administrators must ensure the integrity of the data environment. Any inconsistencies in the data may lead to problems that are difficult to trace.

Datamatic programs

There are usually two ways to edit and update Datamatic objects:

  • interactively via the dm_tools program

  • using batch mode programs, which typically take file names as their arguments

You can start Datamatic Tools from the Desktop. Also batch programs are, in most cases, run via Datamatic Tools: for example, when all Datamatic source files are to be compiled to binary in the whole project. When a user selects a command from the Datamatic Tools menu, the command starts a batch program via CADMATIC scripts, and the user is not aware of actually running a batch program.

Power users may want to run batch programs in a command shell window. Batch programs expect the full CADMATIC environment (with many environment variables) to be enabled, and normally this is not the case in an ordinary command shell window. An easy way to set up the environment is to start the shell window from the Datamatic Tool, and then use the command Open Terminal Window. This way, the new shell window inherits the full environment of its parent Datamatic Tool program. Just make sure you start the Datamatic Tool program from the project that you wish to set up with batch programs.

Running scripts

The Datamatic tools program (dm_tools) is used in loading and running scripts. There are two ways to run scripts:

  • Run a script normally.

  • Start dm_tools with the '-r' option. The script call must be specified as the next command line argument. The format of the script call is also used in application menus. Example:

    dm_tools -r 'script_file script_name(arg1, arg2...)'

    Note: Script files relative to the current working directory must contain './' before file name. Otherwise the script file loader assumes that the name is relative to %PMS_HOME% or project.

Name lengths

The following table lists the maximum name lengths used by Datamatic objects:

any file name

39

partcode in corporate catalog

31

name of dimension table

19

name of piping spec

19

name of gdl file (without .gd)

23